<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      class User {
        //自动调用
        constructor(name) {
          this.name = name
        }
        jump() {
          console.log('跳')
        }
        eat() {
          console.log('吃')
        }
        say() {
          console.log(`我叫${this.name}`)
        }
      }
      //实例化   实际可使用的对象
      let lisi = new User('李四')
      lisi.say()

      let wangwu = new User('王五')
      wangwu.say()
    </script>
  </body>
</html>
